<!--src\module\websocket\chat\chat.component.html-->
<h1>
    Angular + WebSockets
  </h1>
  <br>
  <div class="row">
    <div class="column">
      <textarea [(ngModel)]="content" name="contentInput" cols="40" rows="5"></textarea>
      <br>
      <input type="text" [(ngModel)]="user">
      <input type="text" [(ngModel)]="room">
      <button (click)="sendMsg()">Send Message</button>
    </div>
  
  </div>
  <br>
  <div>
    <h1>Sent Messages</h1>
    <br>
    <ul>
      <li *ngFor="let item of sent">Source: {{item.source}} -> Content {{item.content}}</li>
    </ul>
  </div>
  
  <br>
  <div>
    <h1>Received Messages</h1>
    <br>
    <ul>
      <li *ngFor="let item of received">Source: {{item.source}} -> Content {{item.content}}</li>
    </ul>
  </div>